package com.etc.test;

import java.util.List;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.etc.entity.Duty;
import com.etc.entity.Medicine;
import com.etc.service.DutyService;
import com.etc.service.MedicineService;
import com.github.pagehelper.PageInfo;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:applicationContext.xml", "classpath:mybatis-config.xml" })
public class DutyTestJUnit {

	@Autowired
	private DutyService dutyService;
	
	
	/**
	 * 查询所有值班测试
	 */
	@Test
	public void selectDuty() {
		List<Duty> duty = dutyService.selectDuty();
		duty.forEach(System.out::println);
	}
	
	/**
	 * 添加值班测试
	 *//*
	@Test
	public void addDuty() {
		Duty duty = new Duty(1, 1 ,1);
		System.out.println(dutyService.insertDuty(duty));
	}*/
	
	/**
	 * 修改药品信息测试
	 *//*
	@Test
	public void updMedicine() {
		Medicine medicine = new Medicine("胃炎康胶囊胶囊", "胃药",10, 19,13);
		System.out.println(medicineService.updMedicine(medicine));
	}
	*/
	
	

	
	
	
}
